package com.xx.sg.controller;

import com.alibaba.fastjson2.JSONObject;
import com.xx.sg.own.service.DataSynService;
import com.xx.sg.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/dataSyn")
@Tag(name = "数据同步Api", description = "数据同步Api")
public class DataSynController {

    @Autowired
    private DataSynService dataSynService;

    @PostMapping("/decrypt")
    @Operation(summary = "解密", description = "解密")
    public R decrypt(@RequestBody  JSONObject jsonObject) {
        dataSynService.dataSyn(jsonObject.getString("data"));
        return R.success();
    }
}
